feat: Add persistent volumes and encrypted secret management for deployments#51
Open
officiallyutso wants to merge 5 commits intomasterfrom
Open
feat: Add persistent volumes and encrypted secret management for deployments#51officiallyutso wants to merge 5 commits intomasterfrom
officiallyutso wants to merge 5 commits intomasterfrom
Conversation
- Add POST /secrets/:subdomain endpoint for creating/updating secrets - Add GET /secrets/:subdomain endpoint for listing secret keys - Add DELETE /secrets/:subdomain endpoint for deleting secrets - Initialize encryption service on server startup - Validate request payloads and enforce authorization - Never expose decrypted secret values in API responses
- Create Docker volumes automatically for each project deployment - Decrypt secrets in-memory and inject at container runtime - Mount volumes at /app/data inside containers - Merge secrets with regular env vars (secrets take precedence) - Clean up volumes when projects are deleted - Maintain backward compatibility with existing deployments
- Add MongoDB functions for project secrets CRUD operations - Add volume metadata tracking functions - Implement authorization helpers for project access verification - Add volume management shell script for Docker operations - Store encrypted secrets with IV and authentication tags
Member
Author
|
Any updates on #51 @raj210809 @opbot-xd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
Encrypted Secrets Management
--env-file(not baked into image layers)Persistent Volumes
/app/datainside containersEncryption
SECRET_MASTER_KEYenvironment variableChanges
Backend
src/backend/utils/encryption.ts- AES-256-GCM encryption servicesrc/backend/utils/authorization.ts- Project access verificationsrc/backend/secrets.ts- Secret management API routessrc/backend/shell_scripts/volume.sh- Volume management scriptsrc/backend/db.ts- Added secrets and volume metadata functionssrc/backend/server.ts- Added routes and encryption initializationsrc/backend/scripts.ts- Integrated volumes and secrets into deploymentsrc/backend/shell_scripts/container.sh- Volume mounting and env injectionsrc/backend/shell_scripts/delete.sh- Volume cleanup on deletionFrontend
src/frontend/src/utils/secrets.ts- Secret API clientsrc/frontend/src/components/SecretManager.vue- Secret management UITests
src/backend/utils/encryption.test.ts- Comprehensive encryption service testsAPI Endpoints
Create/Update Secrets
List Secret Keys
Delete Secrets
Environment Variables
Required (for secrets feature)
SECRET_MASTER_KEY: Master encryption key (32+ characters)Database Collections
New Collections
project_secrets: Encrypted secrets with IV and authentication tagsvolume_metadata: Volume tracking informationRequired Setup
SECRET_MASTER_KEYin backend.envfile (minimum 32 characters)Testing
Run tests:
deno test src/backend/utils/encryption.test.ts --allow-allCloses #45